Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

eth/filters: add finalized block subscription #375

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

andicrypt
Copy link
Contributor

  • Allow users to subscribe to constantly receive notifications about latest finalized blocks

@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from e140e59 to c0f9b0f Compare October 31, 2023 03:44
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from c0f9b0f to 8b05e12 Compare October 31, 2023 03:57
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch 6 times, most recently from 1446d9d to e44dae7 Compare November 1, 2023 06:39
@andicrypt
Copy link
Contributor Author

andicrypt commented Nov 1, 2023

Websocket url: ""
Message:

{"jsonrpc": "2.0","method": "eth_subscribe","params": ["newFinalizedBlocks"],"id": 1}

Response:

{
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0x8fc46d59fe6fad7c474cf4105321ac70",
        "result": {
            "finalizedBlockNumber": "0x14b9c51",
            "finalizedBlockHash": "0xebbe050276be3c1644211994df64c5ee2d9895b289d34f227cb7d86ddd10a81f"
        }
    }
}

Note: Remember turning flag additionalchainevent.enable on.

@andicrypt andicrypt force-pushed the feat/finalized-subscription branch 2 times, most recently from 4e6f076 to 23e998b Compare November 1, 2023 08:54
@andicrypt andicrypt changed the title [feat]: add finalized block subscription eth/filters: add finalized block subscription Nov 1, 2023
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from 23e998b to 432d815 Compare November 2, 2023 02:52
@andicrypt andicrypt force-pushed the feat/finalized-subscription branch from 432d815 to 9da177d Compare November 2, 2023 03:58
@minh-bq minh-bq merged commit 061ab32 into axieinfinity:master Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants